import request from '@/utils/request'

// 获取商品列表
export const getProductsData = params => {
  return request ({
    method: 'GET',
    url: '/products',
    params
  })
}

// 获取商品详情
export const getProductsDetails = productId => {
  return request ({
    method: 'GET',
    url: `/product/detail/${productId}`
  })
}
// 获取商品评价数量  /reply/config/:productId
export const getCommentCounts = productId => {
  return request ({
    method: 'GET',
    url: `/reply/config/${productId}`
  })
}
// 根据分类获取评价
export const getCommentByType = (productId, params) => {
  return request ({
    method: 'GET',
    url: `/reply/list/${productId}`,
    params
  })
}
